//
//  ZXDetailTableViewController.m
//  ZhuoxinAgriculture
//
//  Created by maxine on 2016/11/9.
//  Copyright © 2016年 KKING. All rights reserved.
//

#import "ZXDetailTableViewController.h"
#import "ZXDetailTableViewCell.h"

@interface ZXDetailTableViewController ()

@end

@implementation ZXDetailTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"贷款详情";
    self.tableView.rowHeight = 55;
    
    self.tableView.backgroundColor = [UIColor colorWithRed:245/255.0 green:245/255.0 blue:245/255.0 alpha:1];
   
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 8;
}


- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    //创建cell
    ZXDetailTableViewCell *cell = [ZXDetailTableViewCell cellWithTableView:tableView];
    switch (indexPath.row) {
        case 0:
        cell.titleLable.text = @"客户名称";
        cell.detailLable.text = self.model.custName;
        break;
        case 1:
        cell.titleLable.text = @"手机";
        cell.detailLable.text = self.model.mobile;

        break;
        case 2:
        cell.titleLable.text = @"身份证号码";
        cell.detailLable.text = self.model.certNo;

        break;
        case 3:
        cell.titleLable.text = @"预约单号";
        cell.detailLable.text = self.model.orderNo;

        break;
        case 4:
        cell.titleLable.text = @"预约日期";
        cell.detailLable.text = self.model.orderTime;

        break;
        case 5:
        cell.titleLable.text = @"产品名称";
        cell.detailLable.text = self.model.prodName;

        break;
        case 6:
        cell.titleLable.text = @"借款用途";
        cell.detailLable.text = self.model.loanUseVal;

        break;
        case 7:
        cell.titleLable.text = @"贷款状态";
        cell.detailLable.text = self.model.loanStatusVal;

        break;

        default:
        break;
    }
  
    return cell;

}

/*
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the specified item to be editable.
    return YES;
}
*/

/*
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        // Delete the row from the data source
        [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
    } else if (editingStyle == UITableViewCellEditingStyleInsert) {
        // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
    }   
}
*/

/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
}
*/

/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the item to be re-orderable.
    return YES;
}
*/

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
